package com.qf.ssm.pojo;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.util.ObjectUtils;

@ApiModel(description = "区域对象数据")
public class Areas implements CheckNull{

  private Long id;
  @ApiModelProperty(value = "区域名" ,required = true,example = "海淀区")
  private String areaname;
  @ApiModelProperty(value = "父区域ID",example ="1")
  private Long parentid;
  @ApiModelProperty(value ="状态,0 禁用,1 启用",required = true,example = "1")
  private Long status;
  @ApiModelProperty(value = "父区域名，查询时候返回",example = "海淀区",hidden = true)
  private String parentname;


  public String getParentname() {
    return parentname;
  }

  public void setParentname(String parentname) {
    this.parentname = parentname;
  }

  @Override
  public boolean isNull(CheckStatus status) {
    switch (status) {

      case ADD:
        return ObjectUtils.isEmpty(areaname) ;
    }
    return false;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public String getAreaname() {
    return areaname;
  }

  public void setAreaname(String areaname) {
    this.areaname = areaname;
  }

  public Long getParentid() {
    return parentid;
  }

  public void setParentid(Long parentid) {
    this.parentid = parentid;
  }

  public Long getStatus() {
    return status;
  }

  public void setStatus(Long status) {
    this.status = status;
  }
}
